<?php 
    require_once "isLogin.php"; 
    require_once "isFile.php";
?>
<!doctype html>
<html>
<head>
    <meta charset="utf-8">

	<meta name="description" content="MarkDown简明语法在线编辑器实验">
	<meta name="keywords" content="HTML,CSS,JS,MARKDOWN,BOOTSTRAP">
	<meta name="author" content="zhonger">
	
	<title>MarkDown简明语法在线编辑器实验室</title>
    <link rel="icon" href="images/logo.ico">
    <!--Bootstrap样式引用-->
	<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap-theme.min.css">
    <script src="bower_components/jquery/dist/jquery.min.js"></script>
    <script src="bower_components/jquery.cookie/jquery.cookie.js"></script>
    <script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
	<!--codemirror样式引用-->
    <script src="cm/lib/codemirror.js"></script>
    <link rel="stylesheet" href="cm/lib/codemirror.css">
    <!--script src="cm/mode/javascript/javascript.js"></script>-->
    <script src="cm/addon/edit/matchbrackets.js"></script>
    <script src="cm/mode/htmlmixed/htmlmixed.js"></script>
    <script src="cm/mode/css/css.js"></script>
    <link rel="stylesheet" href="cm/addon/fold/foldgutter.css" />
    <script src="cm/lib/codemirror.js"></script>
    <script src="cm/addon/fold/foldcode.js"></script>
    <script src="cm/addon/fold/foldgutter.js"></script>
    <script src="cm/addon/fold/brace-fold.js"></script>
    <script src="cm/addon/fold/xml-fold.js"></script>
    <script src="cm/addon/fold/markdown-fold.js"></script>
    <script src="cm/addon/fold/comment-fold.js"></script>
    <script src="cm/mode/javascript/javascript.js"></script>
    <script src="cm/mode/xml/xml.js"></script>
    <script src="cm/mode/markdown/markdown.js"></script>
    <!--showdownjs样式引用-->
    <script src="bower_components/showdown/dist/showdown.min.js"></script>
    <!--highlight样式引用-->
    <link rel="stylesheet" href="bower_components/highlightjs/styles/default.css">
    <script src="bower_components/highlightjs/highlight.pack.js"></script>
    <!--自写样式-->
    <script src="mk_editor.js"></script>
    <link rel="stylesheet" href="mk_editor.css">
    
</head>
<body >
    <?php require "./head.php" ?>
    <div class="container">
        <div class="row main">
            <div class="col-md-12">
                <acticle>
                    <div class="btn-group" id="btn-group">
                        <button type="button" class="btn btn-default"  data-toggle="tooltip" data-placement="top" title="{{label}}" id="{{id}}">
                            <span class="{{glyphicon}}" aria-hidden="true"></span>
                        </button>
                        
                    </div>
                    <div class="btn-group toolbar">    
                        
                        <span >文件名：&nbsp;
                            <?php echo $filename; ?>
                            <input type="text" id="filename" hidden="hidden" value="<?php echo $filename; ?>" />
                        </span>
                        
                        <span >是否公开：&nbsp;
                            <select id="is">
                                <option value="1">是</option>
                                <option value="0">否</option>
                            </select>
                        </span>
                        <button type="button" class="btn btn-primary" id="save">保存</button>
                        <input type="text" id="isPublic" hidden="hidden" value="<?php echo $isPublic ?>" />
                    </div>
                </acticle>
                <acticle>
                    <form class="form">
                        <textarea id="code" name="code" placeholder="请在此输入源代码"><?php echo "$content"; ?></textarea>
                        <div id="browser"></div>
                    </form>
                </acticle>
                
            </div>
        </div>
    </div>
    <?php require "copy.html" ?>


    <!-- Modal -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="myModalLabel">Markdown简要编辑器V1.0</h4>
          </div>
          <div class="modal-body text-center">
              <p>欢迎使用Markdown在线编辑器！</p>
              <p>作者：@zhonger && @pandalp</p>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
          </div>
        </div>
      </div>
    </div>
</body>
</html>